<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>Home - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="accountsApi.html">accountsApi</a><ul class='methods'><li data-type='method'><a href="accountsApi.html#create">create</a></li><li data-type='method'><a href="accountsApi.html#createAddress">createAddress</a></li><li data-type='method'><a href="accountsApi.html#listAddresses">listAddresses</a></li></ul></li><li><a href="queryApi.html">queryApi</a><ul class='methods'><li data-type='method'><a href="queryApi.html#getblockstatus">getblockstatus</a></li><li data-type='method'><a href="queryApi.html#listAsset">listAsset</a></li><li data-type='method'><a href="queryApi.html#listUTXO">listUTXO</a></li></ul></li><li><a href="transactionsApi.html">transactionsApi</a><ul class='methods'><li data-type='method'><a href="transactionsApi.html#buildPayment">buildPayment</a></li><li data-type='method'><a href="transactionsApi.html#buildTransaction">buildTransaction</a></li><li data-type='method'><a href="transactionsApi.html#convertArguement">convertArguement</a></li><li data-type='method'><a href="transactionsApi.html#list">list</a></li><li data-type='method'><a href="transactionsApi.html#submit">submit</a></li></ul></li></ul>
</nav>

<div id="main">
    

    



    


    <section class="package">
        <h3> </h3>		
    </section>









    



    <section class="readme">
        <article><h1>Bytom-JS-SDK</h1><p><a href="https://www.npmjs.com/package/bytom-js-sdk"><img src="https://img.shields.io/npm/v/bytom-js-sdk.svg?style=flat-square" alt="npm version"></a></p>
<h2>Install</h2><pre class="prettyprint source lang-bash"><code>npm install bytom-js-sdk</code></pre><h2>Use</h2><pre class="prettyprint source lang-javascript"><code>let net = {
    main: &quot;http://main-net-host/&quot;,
    test: &quot;http://test-net-host/&quot;
};
let bytom = new Bytom(net, chrome.runtime.getURL(&quot;main.wasm&quot;));

//set Bytom net type (main test), default main net.
bytom.setNetType('test');
console.log(bytom.getNetType());

//create key
bytom.sdk.keys.create(&quot;test_alias&quot;, &quot;123456&quot;).then((res)=>{
    console.log(res)
}).catch(error => {
    console.log(error)
});</code></pre><h2>WebAssembly build</h2><p>Project depends on WebAssembly. \
See <a href="https://github.com/oysheng/Bytom-WebAssembly">Bytom-WebAssembly</a>.</p></article>
    </section>






    
    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Apr 29 2019 10:37:11 GMT+0800 (CST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>



</body>
</html>